package com.lottery.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {

  public static int getWeekNumber() {
    Calendar calendar = Calendar.getInstance();
    calendar.setFirstDayOfWeek(Calendar.MONDAY);
    calendar.setTime(new Date());
    return calendar.get(Calendar.WEEK_OF_YEAR);
  }

  public static int getYear() {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(new Date());
    return calendar.get(Calendar.YEAR);
  }

}
